cmake_minimum_required(VERSION 3.18.2)

project(WEBSERVER)

set(CXX_FLAGS
    -g
    # -DVALGRIND
    -DCHECK_PTHREAD_RETURN_VALUE
    -D_FILE_OFFSET_BITS=64
    -Wall
    -Wextra
    -Werror
    -Wconversion
    -Wno-unused-parameter
    -Wold-style-cast
    -Woverloaded-virtual
    -Wpointer-arith
    -Wshadow
    -Wwrite-strings
    -march=native
    # -MMD
    -std=c++11
    -rdynamic
    )

set(CMAKE_BUILD_TYPE Debug)


set (src_mian APPService.cc)

aux_source_directory(./src Asrc)
# set (_src ./src/Dispatch_http.cc ./src/memorypool.cc ./src/threadpool.cc)
#add_subdirectory(src)


include_directories(./include)

#link_directories(/usr/lib64/mysql)

add_executable(WEBSERVER ${src_mian} ${Asrc})

#find_library(DLL SRC ${PROJECT_SOURCE_DIR}/lib)

#target_link_libraries(${PROJECT_NAME}  libmysqlclient.so)

#target_link_libraries(WEBSERVER mysqlclient)

target_link_libraries(WEBSERVER pthread)